var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(mode, type, selection) {
    var reactor = "action" + cm.getNumberFromQuestInfo(35802, "fall");
    eval(reactor)(mode, type, selection)
}

function action0(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.sendNormalTalk_Bottom("#face0#小心。", 37, 3003903, false, true)
        } else {
            if (status === a++) {
                cm.sendNormalTalk_Bottom("嗯？", 57, 0, true, true)
            } else {
                if (status === a++) {
                    cm.sendNormalTalk_Bottom("#face0#艾尔达瀑布马上就会冲过来。", 37, 3003903, true, true)
                } else {
                    if (status === a++) {
                        cm.sendNormalTalk_Bottom("#face0#不想和其他怪物一起被卷走的话，最好躲在坚硬的岩石下面。", 37, 3003903, true, true)
                    } else {
                        if (status === a++) {
                            cm.addPopupSay(3003903, 5000, "#b#e艾尔达瀑布#n#k倾盆而下。先躲在#e#r发紫光的岩石#k#n下面吧。", "", 0);
                            cm.getWeatherEffectNotice("艾尔达的溪流的情况很不寻常。在巨大的波浪袭来之前，赶快躲到安全的空间去！", 271, 4000, 1);
                            cm.playerMessage(5, "艾尔达的溪流的情况很不寻常。在巨大的波浪袭来之前，赶快躲到安全的空间去！");
                            cm.setNumberForQuestInfo(35802, "fall", 1);
                            cm.eldaFallStart(2);
                            cm.dispose()
                        }
                    }
                }
            }
        }
    }
}

function action1(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.sendNormalTalk_Bottom("#face0#又开始了。", 37, 3003903, false, true)
        } else {
            if (status === a++) {
                cm.addPopupSay(3003903, 5000, "#b#e艾尔达瀑布#n#k倾盆而下。先躲在#e#r发紫光的岩石#k#n下面吧。", "", 0);
                cm.getWeatherEffectNotice("艾尔达的溪流的情况很不寻常。在巨大的波浪袭来之前，赶快躲到安全的空间去！", 271, 4000, 1);
                cm.playerMessage(5, "艾尔达的溪流的情况很不寻常。在巨大的波浪袭来之前，赶快躲到安全的空间去！");
                cm.setNumberForQuestInfo(35802, "fall", 2);
                cm.eldaFallStart(2);
                cm.dispose()
            }
        }
    }
}

function action2(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.sendNormalTalk_Bottom("#face0#是水声。", 37, 3003903, false, true)
        } else {
            if (status === a++) {
                cm.addPopupSay(3003903, 5000, "#b#e艾尔达瀑布#n#k倾盆而下。先躲在#e#r发紫光的岩石#k#n下面吧。", "", 0);
                cm.getWeatherEffectNotice("艾尔达的溪流的情况很不寻常。在巨大的波浪袭来之前，赶快躲到安全的空间去！", 271, 4000, 1);
                cm.playerMessage(5, "艾尔达的溪流的情况很不寻常。在巨大的波浪袭来之前，赶快躲到安全的空间去！");
                cm.setNumberForQuestInfo(35802, "fall", 3);
                cm.eldaFallStart(2);
                cm.dispose()
            }
        }
    }
};